Move natvis files from src/etc/natvis to debugger_visualizer attributes#154027
Move natvis files from src/etc/natvis to debugger_visualizer attributes#154027clarfonthey wants to merge 3 commits into
src/etc/natvis to debugger_visualizer attributes#154027Conversation
|
r? @clubby789 rustbot has assigned @clubby789. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
rust/compiler/rustc_codegen_ssa/src/back/linker.rs Lines 1087 to 1105 in a3903b1 |
|
LGTM from the compiletest side once the pretty printer files changes are removed, but I don't have a Windows system to check if the above comment about the linker is true |
|
I also don't have windows |
|
I haven't really touched Windows in years and never did any native development on it. I know some linkage related things because I was trying to get weak linkage working on Windows for EII. As such I don't think I'm a suitable reviewer. |
|
Hmm... @michaelwoerister reviewed this code originally. Any thoughts? |
This comment has been minimized.
This comment has been minimized.
Looking into it, this appears to be the case; the loop below this section that collects the natvis files from all compiled crates should be sufficient. Removed it. |
b14e911 to
40db624
Compare
This comment has been minimized.
This comment has been minimized.
|
This looks right to me. The only possible downside I can think of is that this now loads all the natvis files into memory and then writes them out to temporary files (with more obscure file names). But a) the size is not large and b) that's just like how user natvis files are treated anyway. So I don't think it's much of a downside. If it is advantageous to optimise this then such an optimisation should be applied outside of the standard library too. |
|
I would be truly shocked if 14KiB of XML was what broke the bank for compiling on Windows. |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I guess this will need updating: Line 8 in ac6f3a3 Or |
|
Wow, that script hasn't been touched in 8 years. I'm going to leave it in this PR but would say it's fair to remove if you want to try submitting a PR that removes it and seeing who objects. |
|
@bors r=bjorn3,ChrisDenton rollup |
|
@bors r- Right, brain fart. That script should be modified too. |
|
This pull request was unapproved. |
src/etc/natvis to debugger_visualizer attributessrc/etc/natvis to debugger_visualizer attributes
|
Gonna defer to the incredibly democratic and sound process of asking Windows users on Zulip if they care: #general > rust-windbg script? Kind of agree that the best course of action would be to just remove the script and update the dev guide, which appear to be the only relevant places |
|
I admit I forgot |
|
Since this was suggested: @rustbot ping windows But personally, I think to get this out of the door for now, I like the idea of just leaving a message in the script and waiting for some predetermined amount of time to see if anyone notices. I assume that the answer will just be to delete the script, but figure people are still using it. |
|
Hey Windows Group! This issue has been identified as a good "Windows candidate". cc @albertlarsan68 @arlosi @ChrisDenton @danielframpton @dpaoliello @gdr-at-ms @kennykerr @luqmana @nico-abram @retep998 @sivadeilra @wesleywiser |
|
Just a heads up, CI probably won't catch any issues with this. AFAIK, the only semi-reliable test runner for debug info is All that said, imo this 100% needs to be tested by hand by somebody before it gets merged. I've given my general sentiment on this change on zulip (tl;dr, i would prefer almost any alternative that doesn't use |
View all comments
This is the "easy part" of a massive rabbit hole that I fell into trying to figure out how the current debug visualizers for hashmaps could potentially be moved into the
hashbrowncrate, while still being able to leverage them for libstd.For natvis, it's pretty easy to separate out what belongs where, and we basically already do this. This just takes it a slight step further and attempts to move them into their relevant crates, and we'll see if it breaks everything in CI. For lack of a better place, this moves the "intrinsic" (should probably be renamed to "primitive") natvis file into the libcore crate, since
no_coreis unstable anyway.The Python scripts are an absolute mess, and that's going to take some asking around. So, instead of stalling this part on that being done, I decided to just offer this PR and we'll see if it can work and hopefully make it easier for people to modify the debug visualizers in the standard library, at least for Windows.
Worth also mentioning right now that I don't have a copy of Windows proper to test this on, so, I'm mostly relying on CI/others to verify that this actually doesn't break anything.